﻿using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.OleDb;

namespace MeetingMinutesManager.DB
{
    public class DBConnectionOperator
    {
        /// <summary>
        /// Open a new connection based on the connection String
        /// </summary>
        /// <param name="connectionString">Ole DB connection</param>
        /// <returns></returns>
        /// <example>Provider=SQLOLEDB.1;Data Source=bs-pc-664\\Planner;Password=Expire!23$;Persist Security Info=True;User ID=sa;Initial Catalog=PMP</example>
        /// <exception cref="">May throw exception while openning the connection.</exception>
        public static OleDbConnection OpenConnection(String connectionString)
        {
            OleDbConnection conn = new OleDbConnection();
            conn.ConnectionString = connectionString;
            conn.Open();

            return conn;
        }
    }
}
